#include "shm.h"
int main(int argc, char const *argv[])
{
	signal(SIGINT,signal_fun);
	create_or_get_shm();
	//建立映射
	shmaddr=shmat(shmid,NULL,0);

	if(shmaddr == (void *) -1) print_err("shmaddr error");
	printf("shmaddr=%d\n",shmaddr );

	while(1){
		printf("please input:\n" );
		scanf("%s",buf);
		memcpy(shmaddr,buf,sizeof(buf));
	}
	return 0;
}

